#!/bin/bash

# APK Resign Tool - 通用工具函数模块
# 包含执行build-tools命令的辅助函数

# 从config模块导入函数
if [ -z "$(type -t get_build_tools_path)" ]; then
    source "$(dirname "${BASH_SOURCE[0]}")/config.sh"
fi

# 执行build-tools命令的辅助函数
run_build_tool() {
    local tool_name="$1"
    shift
    
    local build_tools_path=$(get_build_tools_path)
    
    if [ -n "$build_tools_path" ] && [ -f "$build_tools_path/$tool_name" ]; then
        "$build_tools_path/$tool_name" "$@"
    else
        "$tool_name" "$@"
    fi
} 